home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Everything For A Hacker
/
19990506-[HACK].iso
/
HEXEDIT
/
UTILS
/
ZENDISK1.ARJ
/
LST8-16.ASM
< prev
next >
Wrap
Assembly Source File
|
1990-02-15
|
584b
|
25 lines
;
; *** Listing 8-16 ***
;
; Adds AL to each element in an array until the result
; of an addition exceeds 7Fh.
; Uses two jumps in the loop, with a final INC to adjust
; BX for the last addition.
;
jmp Skip
;
Data db 999 dup (0),7fh
;
Skip:
mov bx,offset Data
mov al,2 ;we'll add 2 to each array element
call ZTimerOn
AddLoop:
add [bx],al ;add the value to this element
js EndAddLoop ;done if Sign flag set
inc bx ;point to the next array element
jmp AddLoop ;do the next element
EndAddLoop:
inc bx ;adjust BX for the final addition
call ZTimerOff